#app {

  .main-container {
    min-height: 100%;
    transition: margin-left .28s;
    margin-left: $sideBarWidth;
    position: relative;
  }

  .openSidebar{
    .sidebar-container{
      a{
        .el-menu-item{
          // width: 159px;
          height: 36px;
          // color: #fff !important;
          line-height: 36px !important;
          text-align: center;
          margin: 10px auto 10px auto;
          text-align: center;
          padding: 0 !important;
        }
        .el-menu-item.is-active{
          width: 159px;
          height: 36px;
          background: #E6184E !important;
          opacity: 0.9;
          border-radius: 10px;
          color: #fff !important;
          line-height: 36px !important;
          text-align: center;
          margin: 10px auto 10px auto;
        }
      }
      .router-link-exact-active{
        position: relative;
      }
      .router-link-exact-active::after{
        content: '';
        width: 5px;
        height: 32px;
        background: #E6184E;
        border-radius: 2px;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
      }
      a:hover:not(.router-link-exact-active){
        & ::after{
          content: '';
          width: 5px;
          height: 32px;
          background: #E6184E;
          border-radius: 2px;
          position: absolute;
          left: 0;
          top: 50%;
          transform: translateY(-50%);
        }
      }
      .el-submenu{
        .el-submenu__title{
          text-align: center;
          color: #333333 !important;
          padding: 0 !important;
          height: 36px;
          line-height: 36px !important;
          text-align: center;
          margin: 10px auto 10px auto;
          .el-submenu__icon-arrow{
            color: #333333;
            margin-right: 15px;
            font-size: 14px;
          }
          .el-submenu__icon-arrow::after{
            display: none;
          }
        }
        .el-menu{
          .nest-menu{
            .el-menu-item{
              background-color: rgb(255, 255, 255) !important;
              .title{
                display: block;
                width: 159px;
                height: 36px;
                opacity: 0.9;
                border-radius: 10px;
                color: #333 !important;
                line-height: 36px !important;
                text-align: center;
                margin: 10px auto 10px auto;
              }
            }
            .el-menu-item.is-active{
              .title{
                display: block;
                width: 159px;
                height: 36px;
                background: #E6184E !important;
                opacity: 0.9;
                border-radius: 10px;
                color: #fff !important;
                line-height: 36px !important;
                text-align: center;
                margin: 10px auto 10px auto;
              }
            }
          }
        }
      }
      .el-submenu.is-active{
        .el-submenu__title{
          padding: 0 !important;
          width: 159px;
          height: 36px;
          background: #E6184E !important;
          border-radius: 10px;
          color: #fff !important;
          line-height: 36px !important;
          text-align: center;
          margin: 10px auto 10px auto;
        }
        .el-submenu__icon-arrow{
          color: #fff;
          margin-right: 0;
          right: 11px;
        }
      }
      .el-submenu.is-active.is-opened{
        .el-submenu__title{
          background: #fff !important;
          color: #333 !important;
        }
        .el-submenu__icon-arrow{
          color: #333;
        }
      }
      .el-submenu:hover:not(.is-opened,.is-active){
        & ::after{
          content: '';
          width: 5px;
          height: 32px;
          background: #E6184E;
          border-radius: 2px;
          position: absolute;
          left: 0;
          top: 50%;
          transform: translateY(-50%);
        }
      }
    }
  }

  .sidebar-container {
    transition: width 0.28s;
    width: $sideBarWidth !important;
    background-color: $menuBg;
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    box-shadow: 0px -3px 12px 0px rgba(172, 171, 171, 0.3);

    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }

    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }

    .el-scrollbar {
      height: 100%;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 50px);
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 10px;
      font-size: 16px;
      vertical-align: middle;
    }

    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }

    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
    }

    // menu hover
    .submenu-title-noDropdown,
    .el-submenu__title {
      &:hover {
        background-color: $menuHover !important;
      }
    }

    .is-active>.el-submenu__title {
      color: $subMenuActiveText !important;
    }

    .el-menu-item:not(.is-active){
      color: #333333 !important;
    }

    & .nest-menu .el-submenu>.el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: $sideBarWidth !important;
      background-color: $subMenuBg !important;
      &:hover {
        background-color: $subMenuHover !important;
      }
    }
  }

  .hideSidebar {
    .sidebar-container {
      width: 54px !important;
      .el-scrollbar{
        .scrollbar-wrapper{
          .el-scrollbar__view{
            .el-menu{
              .router-link-exact-active{
                .is-active{
                  .el-tooltip{
                    .svg-icon{
                      color: #E6184E;
                    }
                  }
                }
              }
              .el-menu-item{
                .el-tooltip{
                  .svg-icon{
                    color: #666666;
                  }
                }
              }
            }
          }
        }
        .el-submenu.is-active{
          .el-submenu__title{
            .svg-icon{
              color: #E6184E;
            }
          }
        }
        .el-submenu{
          .el-submenu__title{
            .svg-icon{
              color: #666666;
            }
          }
        }
      }
    }

    .main-container {
      margin-left: 54px;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }
      }
    }

    .el-submenu {
      overflow: hidden;

      &>.el-submenu__title {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }

        .el-submenu__icon-arrow {
          display: none;
        }
      }
    }

    .el-menu--collapse {
      .el-submenu {
        &>.el-submenu__title {
          &>span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $sideBarWidth !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform .28s;
      width: $sideBarWidth !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$sideBarWidth, 0, 0);
      }
    }
  }

  .withoutAnimation {

    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  &>.el-menu {
    .svg-icon {
      margin-right: 16px;
    }
    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }
  }

  .nest-menu .el-submenu>.el-submenu__title,
  .el-menu-item {
    color: #333333 !important;
    &:hover {
      // you can use $subMenuHover
      background-color: $menuHover !important;
      color: #E6184E !important;
    }
  }
  .is-active{
    color: #E6184E !important;
  }

  // the scroll bar appears when the subMenu is too long
  >.el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}
